package 考察点3;

public class Document {
    Data pd;
    Document(String choice) {
        if (choice.equalsIgnoreCase("Int")){
            pd = new Integer();
        }
        if (choice.equalsIgnoreCase("Double")){
            pd = new Double();
        }
    }
    public void displayData(){
        pd.displayvalue();
    }
}
